<div class="modal-content">
  <div class="modal-header">
    <button type="button" class="close" ng-click="cancel()" aria-label="Close">
      <em class="ion-ios-close-empty sn-link-close"></em>
    </button>
    <h4 class="modal-title" id="modal-title">设置人员</h4>
  </div>
  <div class="modal-body" id="modal-body">

  <div class="row">
    <div class="col-sm-12">
        <form class="form-horizontal" name="menuBarForm" id="menuBarForm" angular-validator angular-validator-submit="ok()" novalidate >

          <div class="form-group" ng-class="{'has-error' : validateFlag && !formData.name}">
            <label class="col-sm-3 control-label">员工姓名</label>
            <div class="col-sm-8">
              <input type="text" ng-model="formData.name" class="form-control"
                     name="name" placeholder="输入员工姓名"
                     required-message="'*请输入员工姓名..'"
                     required>
            </div>
          </div>

          <div class="form-group" ng-class="{'has-error' : validateFlag && !formData.mobile}">
            <label class="col-sm-3 control-label">员工手机号</label>
            <div class="col-sm-8">
              <input type="text" ng-model="formData.mobile" class="form-control"
                     name="mobile" placeholder="输入员工手机号"
                     validate-on="blur"
                     ng-pattern="/^1(3|4|5|7|8)\d{9}$/"
                     invalid-message = "'*手机号格式不正确!'"
                     required-message="'*请输入手机号..'"
                     validate-on="dirty"
                     required>
            </div>
          </div>

          <div class="form-group" ng-class="{'has-error' : validateFlag && !formData.email}">
            <label class="col-sm-3 control-label">员工邮箱</label>
            <div class="col-sm-8">
              <input type="email" ng-model="formData.email" class="form-control"
                     name="email" placeholder="输入员工邮箱"
                     required-message="'*请输入员工邮箱..'"
                     required>
            </div>
          </div>

          <div class="form-group" ng-class="{'has-error' : validateFlag && !formData.password}">
            <label class="col-sm-3 control-label">密码</label>
            <div class="col-sm-8">
              <input type="password" ng-model="formData.password" class="form-control" ng-if="!editFlag"
                     name="password" placeholder="输入密码" autocomplete="new-password"
                     required-message="'*请输入密码..'"
                     required>
              <input type="password" ng-model="formData.password" class="form-control" ng-if="editFlag"
                     name="password" placeholder="输入密码" autocomplete="new-password">
            </div>
          </div>

          <div class="form-group" ng-class="{'has-error' : validateFlag && !formData.roleType}">
            <label class="col-sm-3 control-label">角色区分</label>
            <div class="col-sm-8">
              <div class="col-sm-4">
                <label class="radio-inline custom-radio nowrap">
                  <input type="radio" name="roleType" id="inlineRadio1" ng-model="formData.roleType" ng-value="'1'">
                  <span>操作员</span>
                </label>
              </div>
              <div class="col-sm-4">
                <label class="radio-inline custom-radio nowrap">
                  <input type="radio" name="roleType" id="inlineRadio2" ng-model="formData.roleType" ng-value="'2'">
                  <span>管理员</span>
                </label>
              </div>
            </div>
          </div>

          <div class="form-group" ng-class="{'has-error' : validateFlag && !formData.companyId}">
            <label class="col-sm-3 control-label">所属公司</label>
            <div class="col-sm-5">
              <select class="form-control"  ng-model="formData.companyId" name="companyId"
                      required-message="'*请选择所属公司..'"
                      required>
                <option value="">请选择所属公司:</option>
                <option ng-selected="item.id === formData.companyId"
                        ng-repeat="item in allCompany"
                        value="{{item.id}}">
                  {{item.name}}
                </option>
              </select>
            </div>
          </div>


          <div class="form-group">
            <div class="col-sm-12 text-center">
              <button type="submit" class="btn btn-primary" ng-click="validate()">保&nbsp;&nbsp;&nbsp;&nbsp;存</button>
              <button type="button" class="btn btn-warning" style="margin-left: 20px" ng-click="cancel()">返&nbsp;&nbsp;&nbsp;&nbsp;回</button>
            </div>
          </div>
        </form>
    </div>
  </div>
  </div>
  <div class="modal-footer">
    &nbsp;
  </div>
</div>

